$(function(){
    window.onload = function(){
        $.ajax({
            url:'http://localhost:3000/report/hot',
            mothed:'get',
            success:function(res){
                var str = '';
                var sdd = [];
                for(var i = 0; i < 7; i++){
                    sdd.push(res[i]);
                }
                $.each(sdd,function(index,item){
                    str += 
                    "<div class=left-top>"+
                        "<img src="+item.img+" width=650px>"+
                        "<div class=left-1>"+
                            "<p class=left-p1>"+item.text+"</p>"+
                            "<p class=left-p2>"+
                                "<span>苏苏 "+item.endTime+"</span>"+
                                "<span>"+
                                    "<img src=../img/zan.png width=15px> 3"+
                                    "<img src=../img/xin.png width=15px> 3"+
                                "</span>"+
                            "</p>"+
                        "</div>"+
                        "</div>"+
                    "<div class=left-2>"+
                        "<p>关于"+item.text+"还有4篇报告，点击查看</p>"+
                    "</div>"
                
                })
                $('.left').html(str);
            }
        })
    }
})
$('.click').click(function(){
    $('.center').css('height','2840px');
    $('.left').css('height','2590px');
    $('.click').hide();
})